/* Form components */

.form-group-custom {
  position: relative;
  margin-bottom: 30px;
}

.form-group-custom textarea {
  resize: none;
}
.form-group-custom select {
  width: 100%;
  padding: 7px 12px 7px 0;
  background: none;
  border: none;
  line-height: 1.6;
  box-shadow: none;
}
.form-group-custom .control-label {
  position: absolute;
  top: 0.25rem;
  pointer-events: none;
  padding-left: 0.125rem;
  z-index: 1;
  color: $muted;
  font-weight: normal;
  -webkit-transition: all 0.28s ease;
  transition: all 0.28s ease;
}
.form-group-custom .bar {
  position: relative;
  border-bottom: 0.0625rem solid #999;
  display: block;
}
.form-group-custom .bar::before {
  content: '';
  height: 0.125rem;
  width: 0;
  left: 50%;
  bottom: -0.0625rem;
  position: absolute;
  background: $custom;
  -webkit-transition: left 0.28s ease, width 0.28s ease;
  transition: left 0.28s ease, width 0.28s ease;
  z-index: 2;
}
.form-group-custom input,
.form-group-custom textarea {
  display: block;
  background: none;
  padding: 7px 12px;
  border: none;
  width: 100%;
  color: transparent;
  -webkit-transition: all 0.28s ease;
  transition: all 0.28s ease;
  box-shadow: none;
}
.form-group-custom input[type="file"] {
  line-height: 1;
}
.form-group-custom input[type="file"] ~ .bar {
  display: none;
}
.form-group-custom select,
.form-group-custom input:focus,
.form-group-custom input:valid,
.form-group-custom input.form-file,
.form-group-custom input.has-value,
.form-group-custom textarea:focus,
.form-group-custom textarea:valid,
.form-group-custom textarea.form-file,
.form-group-custom textarea.has-value {
  color: #333;
}
.form-group-custom select ~ .control-label,
.form-group-custom input:focus ~ .control-label,
.form-group-custom input:valid ~ .control-label,
.form-group-custom input.form-file ~ .control-label,
.form-group-custom input.has-value ~ .control-label,
.form-group-custom textarea:focus ~ .control-label,
.form-group-custom textarea:valid ~ .control-label,
.form-group-custom textarea.form-file ~ .control-label,
.form-group-custom textarea.has-value ~ .control-label {
  font-size: 0.8rem;
  color: gray;
  top: -1rem;
  left: 0;
}
.form-group-custom select:focus,
.form-group-custom input:focus,
.form-group-custom textarea:focus {
  outline: none;
}
.form-group-custom select:focus ~ .control-label,
.form-group-custom input:focus ~ .control-label,
.form-group-custom textarea:focus ~ .control-label {
  color: $custom;
}
.form-group-custom select:focus ~ .bar::before,
.form-group-custom input:focus ~ .bar::before,
.form-group-custom textarea:focus ~ .bar::before {
  width: 100%;
  left: 0;
}


.form-control {
  font-family: inherit;
  background-color: $white;
  border: 1px solid #E3E3E3;
  border-radius: 4px;
  color: #565656;
  padding: 7px 12px;
  height: 38px;
  max-width: 100%;
  -webkit-box-shadow: none;
  box-shadow: none;
  -webkit-transition: all 300ms linear;
  -moz-transition: all 300ms linear;
  -o-transition: all 300ms linear;
  -ms-transition: all 300ms linear;
  transition: all 300ms linear;

  &:focus {
    background-color: $white;
    border: 1px solid #AAAAAA;
    -webkit-box-shadow: none;
    box-shadow: none;
    outline: 0 !important;
    color: #333333;
  }
}

textarea.form-control {
  min-height: 90px;
}

select[multiple] {
  height: auto;
}

.input-lg {
  height: 46px;
  padding: 10px 16px;
  font-size: 18px;
  line-height: 1.3333333;
  border-radius: 6px;
}
.input-sm {
  height: 30px;
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 3px;
}
.form-horizontal {
  .form-group {
    margin-left: -10px;
    margin-right: -10px;
  }
}

.form-control-feedback {
  line-height: 38px !important;
}
.input-group-btn {
  .btn {
    padding: 8px 12px;
  }
  .btn-sm {
    padding: 5px 10px;
  }
  .btn-lg {
    padding: 10px 17px;
  }
}


.has-success {
  .form-control {
    border-color: $success;
    box-shadow: none !important;
  }
}

.has-warning {
  .form-control {
    border-color: $warning;
    box-shadow: none !important;
  }
}

.has-error {
  .form-control {
    border-color: $danger;
    box-shadow: none !important;
  }
}

.input-group-addon {
  border-radius: 2px;
  border: 1px solid $light;
}